<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<script type="text/javascript">
	/**
	 * 年级、专业、联动班级信息
	 * @param gradeid
	 * @param specialityid
	 * @param bjid
	 */
	function getSpecailityByClass(gradeid, specialityid, bjid) {
		var now = new Date().getTime();
		var gradeId = $("#" + gradeid).val();
		var specialityId = $("#" + specialityid).val();
		if (gradeId != "" && specialityId != "") {
			var defaultVal = '';
			var defaultText = '\u5168\u90e8';
			var _options = '';
			_options = _options + "<option value="+defaultVal+">" + defaultText
					+ "</option>";
			$("#" + bjid).html(_options);
		} else {
			$.getJSON(
					"${basePath}/common/getGradeSpecialityByClass?now=" + now,
					{
						njid : gradeId,
						zyid : specialityId
					}, function(data) {
						$("#" + bjid).empty();
						var defaultVal = '';
						var defaultText = '\u5168\u90e8';
						var _options = '';
						_options = _options + "<option value="+defaultVal+">"
								+ defaultText + "</option>";
						for (var i = 0; i < data.length; i++) {
							var val = data[i]["bjid"];
							var text = data[i]["bjmc"];
							_options = _options + "<option value="+val+">"
									+ text + "</option>";
						}
						$("#" + bjid).html(_options);
					});
		}
	}
</script>
<tr>
	<td>学期：</td>
	<td><select id="semid" name="semid" class="selectList2">
			<c:forEach items="${semesterList}" var="semester">
				<option value="${semester.xqid}">${semester.xqmc}</option>
			</c:forEach>
	</select></td>
	<td>年级：</td>
	<td><select id="njid" name="njid" class="selectList2"
		onchange="javascript:getSpecailityByClass('njid','zyid','bjid')">
			<option value="">全部</option>
			<c:forEach items="${gradeList}" var="grade">
				<option value="${grade.njid}">${grade.njmc}</option>
			</c:forEach>
	</select></td>
	<td>专业：</td>
	<td><select id="zyid" name="zyid" class="selectList2"
		onchange="javascript:getSpecailityByClass('njid','zyid','bjid')">
			<option value="">全部</option>
			<c:forEach items="${specialityList}" var="speciality">
				<option value="${speciality.zyid}">${speciality.zymc}</option>
			</c:forEach>
	</select></td>
	<td>班级：</td>
	<td><select id="bjid" name="bjid" class="selectList2">
			<option value="">全部</option>
			<%-- 			<c:forEach items="${classList}" var="class"> --%>
			<%-- 			 <option value="${calss.bjid}">${class.bjmc}</option> 
			</c:forEach>--%>
	</select></td>
</tr>